
const express = require('express')
const upload = require('../router_handler/upload')
// 创建路由实例
const router = express.Router()

//上传图片的方法
router.post("/uploadImage", (req, res) => {
  upload(req, res).then(imgsrc => {
    res.send({
      status: 0,
      message: '上传成功',
      imgsrc
    })
  }).catch(err => {
    console.log('err', err);
  })
})

module.exports = router
